package com.xdap.fsapproval.util;

import java.util.Random;

/**
 * @BelongsProject：IntelliJ IDEA
 * @BelongsPackage：com.adisseo.service.approval.util
 * @Author：fei
 * @CreateTime：2022-09-06 18:38
 * @Description: 随机数工具类
 * @Version：1.0
 */
public class RandomUtil {

    /**
     * 获取指定位数随机数
     * @param len
     * @return
     */
    public static String getRandom(int len) {
        Random r = new Random();
        StringBuilder rs = new StringBuilder();
        for (int i = 0; i < len; i++) {
            rs.append(r.nextInt(10)); }
        return rs.toString();
    }
}
